<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.sfilyh.util.DBUtil" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	request.setAttribute("nav", "1");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css"  href="<%=request.getContextPath()%>/css/cssbase.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/admin.css" />
</head>
<body>
<div class="header"></div>
<div class="content">
	<div class="left">
    	<h3 class="left_menu_title">操作菜单</h3>
        <jsp:include page="/WEB-INF/views/admin/left.jsp" />
    </div>
	<div class="right">
	  	<table class="right_table">
            <thead>            
				<tr>
                	<th style="width:60px;"></th>
                    <th style="width:250px;text-align:left;">分类</th>
                    <th style="width:400px;text-align:left;">标题</th>
                    <th style="text-align:center;">发布日期</th>
                </tr>
            </thead>
            
            <c:forEach var="item" items="${pb.pageData}">
				<tr>
	            	<td class="tb_cb">
	            		<label style="color: red;">
		            		<c:choose>
		            			<c:when test="${item.status == 1}">[草]</c:when>
		            			<c:when test="${item.ispass == 1 }">[密]</c:when>
		            		</c:choose>
	            		</label>
	            	</td>
	                <td class="tb_category">
	                	<label>${item.cname} </label>
	                    <div class="tb_c_ctrl">
	                    	<a href="<%=request.getContextPath()%>/bz-admin/addArticle?id=${item.id}">[修改]</a>
	                        <a href="<%=request.getContextPath()%>/bz-admin/delArticle?id=${item.id}">[删除]</a>
	                    </div>                	
	                </td>
	                <td class="tb_title"><a target="_blank" href="<%=request.getContextPath()%>/view?id=${item.id}">${item.title}</a> </td>
	                <td class="tb_date">${item.createtime}</td>
	            </tr>	
			</c:forEach>
			
            <tr>
            	<td colspan="4" class="list_footer">
                    <label>共${pb.totalRecord}篇博文&nbsp;${pb.currPage}/${pb.totalPage}页</label>
                	<a href="#" class="page_ctl">首页</a>
                    <a href="<%=request.getContextPath()%>/bz-admin/listArticle?cid=${cid}&page=${pb.prePage}" class="page_ctl">上一页</a>
                    <a href="<%=request.getContextPath()%>/bz-admin/listArticle?cid=${cid}&page=${pb.nextPage}" class="page_ctl">下一页</a>
                    <a href="#" class="page_ctl">尾页</a>
                </td>
            </tr>
            
        </table>
    </div>
</div>
</body>
</html>
